<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<h1>我的购物车</h1>
	<table border="1px">
		<tr>
			<td>商品</td>
			<td>价格</td>
			<td>数量</td>
			<td>小计</td>
			<td>删除</td>
		</tr>
		<c:forEach var="items"  items="${cart.items}">
			<tr>
				<td>${items.title }</td>
				<td><fmt:formatNumber pattern="##.##" value=" ${items.price }"></fmt:formatNumber></td>
				<td>${items.quantity }</td>
				<td><fmt:formatNumber pattern="##.##" value=" ${items.subTotal }"></fmt:formatNumber></td>
				<td>删除</td>
			</tr>
		</c:forEach>
		<tr>
			<td></td>
			<td></td>
			<td>合计</td>
			<td><fmt:formatNumber pattern="##.##" value=" ${cart.allTotal }"></fmt:formatNumber></td>
		</tr>
	</table>	
	<hr />
	<a href="list">继续购买</a>
</body>
</html>